import {createRouter, createWebHashHistory} from 'vue-router'
import layout from '../views/layout/index.vue'
const routes = [
  {
    path: '/',
    name: 'home',
    component: layout,
    redirect: '/index',
    children: [
      {
        path: 'index',
        name: 'Index',
        component: () => import('../views/index/index.vue'),
      },
      {
        path: 'about',
        name: 'About',
        component: () => import('../views/about/index.vue')
      },
      {
        path: 'news',
        name: 'News',
        component: () => import('../views/news/index.vue')
      },
      {
        path: 'solvePlan',
        name: 'solvePlan',
        component: () => import('../views/solvePlan/index.vue')
      },

      {
        path: 'serverAndAttract',
        name: 'ServerAndAttract',
        component: () => import('../views/serverAndAttract/index.vue')
      },

      {
        path: 'detail',
        name: 'newsDetail',
        component: () => import('../views/newsDetail/index.vue')
      }
    ]
  }
]

const router = createRouter({
  history: createWebHashHistory(),
  //base: '/shenwei/',
  routes
})

export default router
